using UnityEngine;
using UnityEngine.UI;

public class DisplayName : MonoBehaviour
{
    public Text legacyTextComponent;
    public DialogueData dialogueData; // Assuming you have a scriptable object with a string property

    void Start()
    {
        DisplayDialogueLine();
    }

    void DisplayDialogueLine()
    {
        if (dialogueData != null)
        {
            legacyTextComponent.text = dialogueData.name;
        }
        else
        {
            Debug.LogError("DialogueData is not assigned.");
        }
    }
}
